import React from 'react';
import Child from './Components/Child.jsx'
import Logo from './assets/img_tree.png'
class App extends React.Component{
    state={
        num:0
    }
    render(){
        return (
            <div>
                <h1>hello world React-cli---{this.state.num}</h1>
                <button onClick={()=>this.add()}>++</button>
                <Child num={this.state.num}/>
                <img src={Logo} alt="" />
            </div>
        )
    }
    add(){
        this.setState((state)=>{
            return {
                num:state.num+1
            }
        })
    }
}

export default App;